<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="36-13-手写Promise-then回调函数的异步执行.js"></script>
</head>

<body>
    <script>
        
        console.log(000);
        let p = new Promise((resolve,reject)=>{
            console.log(111);
            resolve('ok');
        });

        // 异步微任务
        p.then((val)=>{
            console.log(222);
            console.log(val);
        });

        console.log('end');


    </script>
</body>

</html>